#coding: utf-8
from django.db import models
from django.contrib.localflavor.br.br_states import STATE_CHOICES

# Create your models here.

class Loja(models.Model):
    #Dados da empresa
    nomefatasia = models.CharField('Nome Fantasia', max_length=100)
    razaosocial = models.CharField('Razão Social', max_length=150)
    cnpj = models.CharField(max_length=18, blank=True, null=True)
    responsavel = models.CharField('Responsável', max_length=100, blank=True, null=True)
    logotipo = models.ImageField(upload_to='img/logotipo', blank=True, null=True)
    
    #Localizacao
    cidade = models.CharField(max_length=150)
    estado = models.CharField(max_length=2, choices = STATE_CHOICES)
    endereco = models.CharField('Endereço', max_length=100)
    numero = models.CharField('Número', max_length=20)
    bairro = models.CharField(max_length=50)
    cep = models.CharField(max_length=11)
    
    def __unicode__(self):
        return self.razaosocial